package com.sh.data.engine.domain.datadev.flink.service;

import com.sh.data.engine.domain.datadev.flink.model.domain.FlinkTaskDomain;

import java.util.List;

/**
 * @author: zigui.zdf
 * @description:
 * @date: 2021/6/3 14:25
 */
public interface FlinkTaskService {

    void delete(Long nodeId);

    FlinkTaskDomain getActiveByNodeId(Long nodeId);

    FlinkTaskDomain getById(Long id);

    List<FlinkTaskDomain> getAllRunnableTaskList();

    List<FlinkTaskDomain> getAllTaskList();

    List<FlinkTaskDomain> getAllStoppableTaskList();

    void publish(Long nodeId, Integer status, String userId, String remark);

    void rollbackVersion(Long nodeId, Long versionId);

    void saveBaseConfig(
        Long nodeId,
        Long resourceNodeId,
        String mainClass,
        String remark,
        String userId,
        Long projectId);

    void saveEnv(Long nodeId, String envConfig, String userId, Long projectId);

    void saveSchedule(Long nodeId, String scheduleConfig, String userId, Long projectId);

    void reCalculateNextStartAndStopTime(Long nodeId, boolean includeToday);
}
